package com.wy.scs.rabbitmq.producer.message;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.integration.annotation.ServiceActivator;
import org.springframework.messaging.Message;
import org.springframework.stereotype.Component;

/**
 * @author wangyong
 */
@Slf4j
@Component
public class DemoProducerConfirmCallback {

    @ServiceActivator(inputChannel = "demo-producer-confirm")
    public void onPublisherConfirm(Message message) {
        log.info("发送消息确认消息：消息头：{}", message.getHeaders());
        log.info("发送消息确认消息：消息载体：{}", message.getPayload());
    }

}
